﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WTwitter.Model.UserData;
using WTwitter.Model.Utility;
using WTwitter.Model.Twitter.Json;

namespace WTwitter.Model.Twitter.Utility {
	static class FavoritesMethod {
		private static string _createUrl = "http://api.twitter.com/1/favorites/create/{0}.json";
		private static string _destroyUrl = "http://api.twitter.com/1/favorites/destroy/{0}.json";

		public static Status Create(long statusId, AuthInfo info) {
			return WebUtility<Status>.GetDeserializedJsonData(
				string.Format(_createUrl, statusId.ToString()),
				"POST", new RequestParameter[] { }, info);
		}

		public static Status Destroy(long statusId, AuthInfo info) {
			return WebUtility<Status>.GetDeserializedJsonData(
				string.Format(_destroyUrl, statusId.ToString()),
				"POST", new RequestParameter[] { }, info);
		}
	}
}
